#ifndef _WMS_DEVICE_H_
#define _WMS_DEVICE_H_

#include "wms_config.h"
#include "wms_wifi.h"

typedef enum{
    PRINTER_STATUS_INIT = 0,
    PRINTER_STATUS_START,
    PRINTER_STATUS_WORKING,
    PRINTER_STATUS_FINISH,
}printer_state_e;

typedef enum{
    PAPER_STATUS_NORMAL = 0,
    PAPER_STATUS_LACK,
}paper_state_e;

typedef struct
{
    uint8_t battery;
    uint8_t temperature;
    paper_state_e paper_state;
    printer_state_e printer_state; 
    bool read_ble_finish;
    wifi_state_e wifi_state;              // WiFi连接状态
    device_bind_state_e device_bind_state; // 设备绑定状态
    char server_url[100];                 // 服务器URL
    char device_id[32];                   // 设备ID
}device_state_t;

void init_device_state();

device_state_t * get_device_state();

void set_read_ble_finish(bool finish);

void set_device_paper_status(paper_state_e status);

// 设置WiFi状态
void set_wifi_status(wifi_state_e status);

// 设置设备绑定状态
void set_device_bind_status(device_bind_state_e status);

// 设置服务器URL
void set_server_url(const char* url);

// 设置设备ID
void set_device_id(const char* id);

#endif